package com.cap.bts.crmdp.dealer.masterinfo.constants;

import com.cap.bts.framework.codemapping.service.ICodeMapping;
import com.cap.bts.framework.common.exception.AppException;
import com.cap.bts.framework.common.util.ApplicationContextUtil;

public final class MasterInfoConstants {
    /**
     * 下载增量同步文件类型
     */
    public static final String MASTER_INFO_FILETYPE            = "masterFileType";

    /**
     * 同步文件的综合查询
     */
    public static final String MASTER_INFO_QUERY_FILEPATH      = "masterQueryFilePath";

    /**
     * 同步文件的下载地址
     */
    public static final String MASTER_INFO_DOWNLOAD_FILEPATH   = "downloadFilePath";

    /**
     * 文件类型--轮胎
     */
    public static final String FILE_TYPE_TYREPRODUCTFILE       = "tyreProductFile";

    /**
     * 文件类型--非轮胎
     */
    public static final String FILE_TYPE_OTHERPRODUCTFILE      = "otherProductFile";

    /**
     * 文件类型--服务
     */
    public static final String FILE_TYPE_SERVICEFILE           = "serviceFile";

    /**
     * 查询URL
     */
    public static final String QUERY_URL_PATH                  = "http://test.feed.wecare.masterdata.cn/v1/files?";

    /**
     * 下载文件的URL
     */
    public static final String DOWNLOAD_URL_PATH_STRING        = "http://test.feed.wecare.masterdata.cn/";

    /**
     * 本地存储文件路径
     */
    public static final String LOCALHOSTPATH_STRING2            = "/crmFile/masterFile/";

    /**
     * 增量同步
     */
    public static final String SYNCHRONIZATIONMETHOD_INCREMENT = "increment";

    /**
     * 全量同步
     */
    public static final String SYNCHRONIZATIONMETHOD_FULL      = "full";
    
    public static final String WECARE_DATA_DOWNLOAD = "WeCareDataDownLoad";
    
    public static final String WECARE_DATA_SYNCHRONIZATION = "WeCareDataSynchronization";

    private MasterInfoConstants() {

    }
    
    public static String getLOCALHOSTPATH_STRING(){
    	try {
			ICodeMapping codeMappingService =(ICodeMapping)ApplicationContextUtil.getBean("codeMappingImpl"); 
			return codeMappingService.getCodeValueByCode("tmpPath", "tmpPath");
		} catch (AppException e) {
			new AppException("getLOCALHOSTPATH_STRINGError", e);
		}
		return null;
    }
}
